package com.wicket.okrcomponent.integration.dto;

import com.wicket.okrcomponent.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * @desc NodeAttributeGraphDatabaseDto
 * @使用场景
 */
@Data
public class NodeAttributeGraphDatabaseDto
  extends BaseDto
  implements Serializable {

  /**
   * 属性名称
   */
  @NotNull(message = "属性名称不能为空")
  @ApiModelProperty("属性名称")
  private String attributeName;

  /**
   * 属性类型 WORD:WORD文档 EXCEL:EXCEL文档 PDF:PDF文档
   */
  @NotNull(message = "属性类型不能为空")
  @ApiModelProperty("属性类型")
  private String attributeType;

  /**
   * 属性值
   */
  @NotNull(message = "属性值不能为空")
  @ApiModelProperty("属性值")
  private String attributeValue;

  /**
   * 节点ID（唯一标识）
   */
  @ApiModelProperty("节点ID（唯一标识）")
  private String nodeId;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    NodeAttributeGraphDatabaseDto that = (NodeAttributeGraphDatabaseDto) o;
    return (
      attributeName == that.attributeName &&
      attributeType == that.attributeType &&
      attributeValue == that.attributeValue &&
      nodeId == that.nodeId
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      attributeName,
      attributeType,
      attributeValue,
      nodeId
    );
  }

}
